﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using IBM.Data.DB2;

public partial class zxgztj_lx : System.Web.UI.Page
{
    public DataTable dt;
    public int j = 7;
    public int indexa;
    public string get_str;
    public string get_str2;
    public string lx;

    protected void Page_Load(object sender, EventArgs e)
    {

        DB2Command cmd;
        string stype = "lx";

        if (Request.QueryString["ksrq"] != null)
        {

        }
        else
        {

        }

        //FFFYDM的值为“0”，本版本只是柳州中院及其所下属法院的统计。
        fffydm.Text = "0";
        ffydm.Text = "2760";
        fydm.Text = "0";
        tsdm.Text = "0";
        fymc.Text = "";
        tsmc.Text = "";
        rymc.Text = "";
        proname.Text = "ZXGZTJ_ZXAJLX";


        ksrq.Text = (int.Parse(DateTime.Now.Year.ToString("0000")) - 1).ToString() + "-" + "12-21";
        jsrq.Text = DateTime.Now.ToString("yyyy-MM-dd");



        if (Request.QueryString["fydm"] != null)
        {
            fydm.Text = Request.QueryString["fydm"].ToString();

            if (Request.QueryString["tsdm"] != null)
            {
                tsdm.Text = Request.QueryString["tsdm"].ToString();
            }
        }

        if (Request.QueryString["fymc"] != null)
        {
            fymc.Text = Request.QueryString["fymc"].ToString();
        }

        if (Request.QueryString["tsmc"] != null)
        {
            tsdm.Text = Request.QueryString["tsmc"].ToString();
        }

        if (Request.QueryString["rymc"] != null)
        {
            rymc.Text = Request.QueryString["rymc"].ToString();
        }

        if (Request.QueryString["ksrq"] != null)
        {
            ksrq.Text = Request.QueryString["ksrq"].ToString();
            jsrq.Text = Request.QueryString["jsrq"].ToString();
        }

        if (Request.QueryString["proname"] != null)
        {
            rymc.Text = Request.QueryString["proname"].ToString();
        }

        ksrq.Text = ksrq.Text.Replace('/', '-');
        jsrq.Text = jsrq.Text.Replace('/', '-');

        get_str = "&ksrq=" + ksrq.Text + "&jsrq=" + jsrq.Text + "&proname=" + proname.Text;

        if (ffydm.Text != "0" && fydm.Text == "0")
        {
            dt = BLL.ZXTJ_Service.GetZXGZTJ_Pro(ffydm.Text, "0", tsdm.Text, ksrq.Text, jsrq.Text, proname.Text);
        }
        else if (fydm.Text != "0" && tsdm.Text == "0")
        {
            dt = BLL.ZXTJ_Service.GetZXGZTJ_Pro( "0",fydm.Text, "0", ksrq.Text, jsrq.Text, proname.Text);
        }
        else if (fydm.Text != "0" && tsdm.Text != "0")
        {
            dt = BLL.ZXTJ_Service.GetZXGZTJ_Pro("0", fydm.Text, tsdm.Text, ksrq.Text, jsrq.Text, proname.Text);
        }

        try
        {
            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
        catch (Exception ex) { dt = null; }

    }
}
